Get the IP Address of a local machine Using C#

FacebookTwitterLinkedInThe function below retrieves the IP address of a local machine using C#. This sample code uses the system.NET namespace to get the host name and then gets the IP address for that host name. C# private string GetIPAddress() { StringBuilder sb = new StringBuilder(); String strHostName = string.Empty; strHostName = Dns.GetHostName(); sb.Append(“The Local Machine … Continue reading Get the IP Address of a local machine Using C#